local yinyi = fk.CreateSkill {

  name = "joy__yinyi",

  tags = { Skill.Compulsory, },

}



yinyi:addEffect(fk.DamageInflicted, {
  name = "joy__yinyi",
  anim_type = "defensive",
  frequency = Skill.Compulsory,
  events = {fk.DamageInflicted},
  can_trigger = function(self, _, target, player, data)
    return target == player and player:hasSkill(yinyi.name) and data.damageType == fk.NormalDamage and
      data.from and data.from:getHandcardNum() ~= player:getHandcardNum() and data.from.hp ~= player.hp and
      player:usedSkillTimes(yinyi.name, Player.HistoryTurn) == 0
  end,
  on_use = Util.TrueFunc,
})

return yinyi